<template>
  <div>
    <!-- 头部 -->
    <div class="HomeHeader">
      <div class="HomeHeader-left">
        <van-icon class="iconfont" class-prefix="icon" name="fenlei" id="top-cart"></van-icon>
        <p>分类</p>
      </div>
      <a class="HomeHeader-center" @click="enterSearch">
        <van-icon class="iconfont" class-prefix="icon" name="sousuo" id="top-iconSearch"></van-icon>
        <div class="search">搜索商品/店铺</div>
      </a>
      <div class="HomeHeader-right">
        <van-icon class="iconfont" class-prefix="icon" name="xinxi" id="top-iconMsg"></van-icon>
        <p class="msg">消息</p>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  methods: {
    enterSearch () {
      this.$router.push('/search')
    }
  }
}
</script>

<style lang="scss" scoped>
p,
input,
img {
  margin: 0;
  padding: 0;
}
.HomeHeader {
  height: 50px;
  top: 0;
  left: 0;
  right: 0;
  background: #f56456;
  display: flex;
  align-items: center;
  font-size: 12px;
  position: fixed;
  z-index: 10;

  &-left {
    margin: 5px 10px 0;
    #top-cart {
      // width: 22px ;
      // height: 22px ;
      display: block;
      margin-top: 3px;
      color: #fff;
      font-size: 22px;
    }
    p {
      margin: 0;
      padding: 0;
      color: #fff;
      margin-top: -4px;
    }
  }

  &-center {
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    border-radius: 15px;
    flex: 1;
    color: #fff;
    margin-right: 12px;
    #top-iconSearch {
      font-size: 16.5px;
      margin-left: 12px;
    }
    .search {
      font-size: 13.2px;
      margin-left: 4px;
    }
  }

  &-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 3px;
    margin-right: 10px;
    #top-iconMsg {
      font-size: 20px;
      color: #fff;
    }
    .msg {
      color: #fff;
      font-size: 12px;
      margin-top: 4px;
    }
  }
}
</style>
